
#include <string.h>
#include "xota+desc.h"



void xota_desc_set_application_valid(uint32_t version, uint32_t crc32)
{
    ota_desc_t ota_desc;
    memset( &ota_desc, 0, sizeof(ota_desc));

    ota_desc.length = sizeof(ota_desc) - 4;
    ota_desc.application = OTA_DESC_APP_VALID;
    ota_desc.crc32 = crc32;
    ota_desc.version = version;

    // save ota desc & 
}

void xota_desc_ota_set(void)
{
    ota_desc_t ota_desc;
    // read ota_desc 

    ota_desc.ota = OTA_DESC_APP_OTA_REQ;

    // save ota desc & reset 
}

void xota_desc_ota_dismiss(void)
{
    ota_desc_t ota_desc;
    // read ota desc 

    ota_desc.ota = OTA_DESC_APP_OTA_INVALID;

    // save ota OTA 
}


void xota_desc_set_ota_copy(uint32_t size, uint32_t source, uint32_t destination, uint32_t option_data)
{
    ota_desc_t ota_desc;

    // read ota desc 

    ota_desc.ota = OTA_DESC_APP_OTA_COPY;
    ota_desc.size = size;
    ota_desc.src_addr = source;
    ota_desc.dest_addr = destination;
    ota_desc.option_data = option_data; //
}
